#include "myboundary.h"
#include <cstdlib>    
#include <GL/glut.h>
#include <iostream>
#include <sstream>
#include "glutfunctions.h"
using namespace std;

void myBoundary::Draw()
{
    glLineWidth(3.0);
    glBegin(GL_LINES);
    glColor3f(0, 0, 0);
    glVertex3f(this->GetLine().GetFrom().GetX(), this->GetLine().GetFrom().GetY(), 0);
    glVertex3f(this->GetLine().GetTo().GetX(), this->GetLine().GetTo().GetY(), 0);
    glEnd();
}

void myBoundary::DrawNew()
{
    glColor3f(0, 0, 0);

    stringstream pos1str, pos2str;
    pos1str << "(" << GetLine().GetFrom().GetX() << ", " << GetLine().GetFrom().GetY() << ")";
    pos2str << "(" << GetLine().GetTo().GetX() << ", " << GetLine().GetTo().GetY() << ")";
    glutText(GetLine().GetFrom().GetX(), GetLine().GetFrom().GetY(), pos1str.str());
    glutText(GetLine().GetTo().GetX(), GetLine().GetTo().GetY(), pos2str.str());
}
